From: Maximilian Engelhardt Date: Thu, 5 Jan 2023 23:49:43 +0000 (+0100) Subject: debian: remove old leftovers from config file handling X-Git-Tag: archive/raspbian/4.17.1+2-gb773c48e36-1+rpi1~1^2~45 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=470c265cdcfcf2ecd9fb615d6c3198b49e6f83f0;p=xen.git debian: remove old leftovers from config file handling ae40dca3211ec35ca235a8a1f34c37e13093ff0d removed the call to the debian/ucf-remove-fixup script from debian/rules. However the comment explaining why this call was there was not removed. Additionally the override_dh_ucf now only calls dh_ucf without doing anything else. This commit removes the now unused debian/ucf-remove-fixup script, the leftover comment referring to it and the dh_ucf override which doesn't do anything but a call of dh_ucf. Signed-off-by: Maximilian Engelhardt --- diff --git a/debian/rules b/debian/rules index d16b236f66..dd94e3d4db 100755 --- a/debian/rules +++ b/debian/rules @@ -328,8 +328,3 @@ override_dh_compress: debian/xenstore-utils/usr/bin : dh_compress -Xusr/share/doc/xen/html - -# We are dropping the config file /etc/default/xen which appeared in -# earlier versions. See ./ucf-remove-fixup for more details. -override_dh_ucf: - dh_ucf diff --git a/debian/ucf-remove-fixup b/debian/ucf-remove-fixup deleted file mode 100755 index 33937dee1a..0000000000 --- a/debian/ucf-remove-fixup +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/perl -wpi~ - -# dh_ucf does not seem have a mode for dropping a ucf-managed config -# file. ucf and ucfr can be used to DTRT but are insufficiently -# coooked. -# -# I think the right thing to do, when dropping a ucf-handled config -# file, is -# (i) stop shipping the original file in /usr/share -# (ii) in postinst, do nothing -# (iii) in postrm purge, delete all traces - -# The result of (i) and (ii) is that the file remains recorded by -# ucf and ucfr, but that the original version of the file is no -# longer present on the user's machine. -# -# (iii) is exactly what dh_ucf puts into the postrm. -# -# So, we can be fairly future-proof with the following approach -# (i) stop shipping the original file in /usr/share -# (ii) call dh_ucf -# (iii) call ucf-remove-fixup (this script) -# which strips out the ucf stuff from the postinst - -use strict; -use Carp; - -our ($package, $configfile); - -BEGIN { - die unless @ARGV == 2; - ($package, $configfile) = @ARGV; - @ARGV = ("debian/$package.postinst.debhelper"); - $/ = '# End automatically added section' -} - -next unless m{$configfile}; -confess "UNEXPECTED $_ ?" unless m{^(?=# Automatically added by dh_ucf)}m; - -print $` or die $!; -$_ = $'; -next unless m{^(?!#)}m; -s{\n}{\n# suppressed by ucf-remove-fixup\n}; -s{^(?!#)}{# }mg;